/**
 * 
 */
package com.objectdraw.server.tools;

/**
 * This class handles the creation of Server Tools.
 * @author Harrison
 */
public class ServerToolFactory {

	public static ServerTool createTool(String toolName){
		if("freehand".equalsIgnoreCase(toolName)){
			return new FreehandServerTool();
		}else if("text".equalsIgnoreCase(toolName)){
			return new TextServerTool();
		}else if("line".equalsIgnoreCase(toolName)){
			return new LineServerTool();
		}else if("oval".equalsIgnoreCase(toolName)){
			return new OvalServerTool();
		}else if("rectangle".equalsIgnoreCase(toolName)){
			return new RectangleServerTool();
		}else if("selection".equalsIgnoreCase(toolName)){
			return new SelectionServerTool();
		}
		
		return null;
	}
}
